#! /usr/bin/python
#
#
#id card math 
#

import math
import sys 

card_num = '142702198508184913'
card_w =[]
card_sum = 0;

if len(sys.argv) > 1 and len(sys.argv[1]) > 1:
	card_num = sys.argv[1]
	

for i in range(1,19):
	k = i - 1;
	card_w.append(int(math.pow(2, k)))

for i in range(2,19):
	card_sum +=int(card_num[-i]) * card_w[i-1];

last_num = card_num[-1:]
res_num = str((12 - (card_sum % 11)) % 11)

if res_num == '10':
	res_num = 'x'

if last_num == res_num :
	print 'ok num is ok'
else:
	print 'num is false'
